//
//  PPAPIList.m
//  PetParadise
//
//  Created by 陈无忌 on 8/15/14.
//  Copyright (c) 2014 whalefin. All rights reserved.
//

#import "PPAPIList.h"

static PPAPIList *api = nil;
@interface PPAPIList()

-(void)setupApis;

@end

@implementation PPAPIList

-(id)init
{
    self = [super init];
    if (self) {
        [self setupApis];
    }
    return self;
}

-(void)setupApis
{
    _dianpingUrl = @"http://api.dianping.com/v1/business/find_businesses";
    _rootUrl =
    @"http://pet.fundoing.cn";
//    @"http://127.0.0.1:8080";
//    @"http://121.199.52.168:8090";
//    @"http://10.0.0.37:8080";
    
    _PPCreateVerifyCode = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/createVerifyCode"];
    _PPCheckVerifyCode = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/checkVerifyCode"];
    _PPRegister = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/register"];
    _PPLogin = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/login"];
    _PPLogout = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/Logout"];
    _PPChangePassword = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/changePassword"];
    _PPChangePasswordWithoutLogin = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/changePasswordWithoutLogin"];
    
    
    _PPQueryTopicByTag = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryTopicByTag"];
    _PPQueryTopicByKeyWord = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryTopicByKeyWord"];
    
    
    
    _PPQueryTopicMsgByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryTopicMsgByUserId"];
    _PPQueryTopicById = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryTopicById"];
    _PPDeleteTopicById = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/deleteTopicById"];
    _PPAddTopicMsgWithImg = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/addTopicMsgWithImg"];
    _PPAddOrReplyComment = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addOrReplyComment"];
    _PPAddTopicLike = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addTopicLike"];
    _PPQueryLatestTopicByTargetId = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryLatestTopicByTargetId"];
    _PPDeleteReplyComment = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/deleteReplyComment"];
    _PPQueryOfficeTopic = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryOfficeTopic"];
    
    
    _PPQueryPetById = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryPetById"];
    _PPQueryPetMsgByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryPetMsgByUserId"];
    _PPSaveOrUpdatePetMsg = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/saveOrUpdatePetMsg"];
    _PPDeletePetById = [NSString stringWithFormat:@"%@%@", _rootUrl, @"/deletePetById"];
    _PPDeletePetImg = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/deletePetImg"];
    _PPAddPetImg = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/addPetImg"];
    _PPUpdatePetCodeById = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/updatePetCodeById"];
    _PPQueryPetPhotoById  = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryPetPhotoById"];
    
    
    _PPQueryPetLoveDefault = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryPetLoveDefault"];
    _PPQueryLimitIntoPetLove = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryLimitIntoPetLove"];
    _PPQueryPetLoveByCondition = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryPetLoveByCondition"];
    
    
    _PPQueryUserMsgByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryUserMsgByUserId"];
    _PPUpLoadUserLocation = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/uploadUserLocation"];
    _PPGetUserAblums = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/getUserAblums"];
    _PPQueryFriendByPhoneNum = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryFriendByPhoneNum"];
    
    
    _PPSendRequest = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/sendRequest"];
    _PPOperateRequest = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/operateRequest"];
    _PPQueryFriendByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryFriendByUserId"];
    _PPDeleteUserFriend = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/deleteUserFriend"];
    _PPQueryGroupMember = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryGroupMember"];
    _PPQueryRequestList = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryRequestList"];
    
    _PPCreateConversation = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/createConversation"];
    _PPQueryConversation = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryConversation"];
    _PPCreateGroup = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/createGroup"];
    _PPQueryUserGroupList = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryUserGroupList"];
    _PPQueryConversationByTargetId = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryConversationByTargetId"];
    
    _PPExitGroup = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/exitGroup"];
    _PPCloseGroup = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/closeGroup"];
    _PPInviteJoinGroup = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/inviteJoinGroup"];
    _PPJoinGroup = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/joinGroup"];
    _PPSearchGroup = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/searchGroup"];
    
    
    _PPQueryPetBreed = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryPetBreed"];
    
    
    _PPPersonalPush = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/personalPush"];
    
    
    _PPQueryUserCirclePush = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryUserCirclePush"];
    _PPSetIsRead = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/setIsRead"];
    
    
    _PPFollow = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/follow"];
    _PPIsFollow = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/isFollow"];
    
    
    _PPGetUserSetting = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/getUserSetting"];
    _PPChangeUserSetting = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/changeUserSetting"];
    
    _PPQueryKeyword = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryKeyword"];
    
    //下列接口暂时无用
    
    _PPAddTopicMsg = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addTopicMsg"];
    _PPAddTopicMsgWithTag = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addTopicMsgWithTag"];
    _PPAddTopicImg = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addTopicImg"];
    
    _PPFavoritePet = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/favoritePet"];
    _PPUpdateUserMsgByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/updateUserMsgByUserId"];
    _PPAddFriend = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addFriend"];
    _PPQueryNewTopicByTargetId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryNewTopicByTargetId"];
    _PPQueryFansByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryFansByUserId"];
    _PPQueryFriendMsgByUserId = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryFriendMsgByUserId"];
    _PPQueryTopicById = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryTopicById"];
    _PPQueryAllNotification = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryAllNotification"];
    _PPQueryAllUserTopic = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryAllUserTopic"];
    _PPAddUserTopic = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/addUserTopic"];
    _PPQueryTopicReply = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/queryTopicReply"];
    _PPReplyUserTopic = [NSString stringWithFormat:@"%@%@",_rootUrl, @"/replyUserTopic"];
    
    _PPQueryUserEaseMobFriend = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/queryUserEaseMobFriend"];
    _PPAddTopicImgByQueue = [NSString stringWithFormat:@"%@%@",_rootUrl,@"/addTopicImgByQueue"]; 
}

+(PPAPIList *)getAPIList
{
    if (api == nil) {
        api = [[PPAPIList alloc] init];
    }
    return api;
}

+(void)destoryInstance
{
    api = nil;
}

@end
